"""
======================
Author: 柠檬班-小简
Time: 2022/11/16 20:14
Project: day15_framwork_V12
Company: 湖南零檬信息技术有限公司
======================
"""
class Data:
    pass

d1 = Data()
# 动态给对象设置属性
setattr(d1,"name","d1")
# 动态给类设置属性
setattr(Data, "tag", "share")

# 对象是有类的属性的
print(getattr(d1, "tag"))
